SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE PROCEDURE [dbo].gspPaymentType_SEARCH
(
@paymentTypeId int = null,
@name nvarchar(256) = null,
@description nvarchar(4000) = null
)
AS

SELECT
  *
FROM
  [dbo].[PaymentType]
WHERE
  (@paymentTypeId IS NULL OR [PaymentTypeId] = @paymentTypeId)
AND
  (@name IS NULL OR @name = '' OR [Name] LIKE @name + '%')
AND
  (@description IS NULL OR @description = '' OR [Description] LIKE @description + '%')


GO
